package com.hbx.residential_service.domain;

import com.hbx.residential_service.utils.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Notice {
    private int ntId;
    private String ntContent;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date ntDate;
    private String ntDateStr;

    public int getNtId() {
        return ntId;
    }

    public void setNtId(int ntId) {
        this.ntId = ntId;
    }

    public String getNtContent() {
        return ntContent;
    }

    public void setNtContent(String ntContent) {
        this.ntContent = ntContent;
    }

    public Date getNtDate() {
        return ntDate;
    }

    public void setNtDate(Date ntDate) {
        this.ntDate = ntDate;
    }

    public String getNtDateStr() {
        if(ntDate!=null){
            ntDateStr= DateUtils.DateToString(ntDate,"yyyy-MM-dd");
        }
        return ntDateStr;
    }

    public void setNtDateStr(String ntDateStr) {
        this.ntDateStr = ntDateStr;
    }
}
